<%@ page contentType="text/html; charset=utf-8" language="java" errorPage="" %>
<%@include file="../include/jspheader.jsp" %>
<head>
<title>用户查询</title>

<script type="text/javascript" src="<s:url value="/js/formValidator3.5.js" includeParams="none"/>"></script>
<script type="text/javascript" src="<s:url value="/js/common.js" includeParams="none"/>"></script>
<script type="text/javascript" src="<s:url value="/js/lucenesearch.js" includeParams="none"/>"></script>
<script type="text/javascript">
function resetUserPass(){
    if(confirm("是否确认要重置用户密码，重置后的密码将发送到客户邮箱")){
        $('#passform').submit();
    }
}

function doModify(){
    if (confirm("是否确认要修改用户信息")) {
        $('#modifyform').submit();
    }
}

</script>
</head>
<body>
<s:form id="passform" name="passform" method="post" namespace="/" action="resetUserPass" theme="simple">
    <input type="hidden" name="user.id" value="<s:property value="user.id"/>"/>
    <div id="sa" class="sa2 p10 mb10">
        <table>
            <tr>
                <th width="90">用户名：</th>
                <td>${user.userName}</td>
                <th width="90">email：</th>
                <td>${user.email}</td>
                <th width="90"></th>
                <td>
                    <shiro:hasPermission name="user:resetPassword">
                    <input type="button" value="重置密码" onclick="resetUserPass()"/>
                    </shiro:hasPermission>
                </td>
            </tr>
        </table>
    </div>
</s:form>
<s:form id="modifyform" name="modifyform" method="post" namespace="/" action="modifyUser" theme="simple">
    <input type="hidden" name="user.id" value="<s:property value="user.id"/>"/>
<div id="sa" class="sa2 p10 mb10">
	<table>
		<tr>
		    <th width="90">联系电话：</th>
			<td width="270"><input type="text" autocomplete="off" class="sa_w_tx" id="telephone" name="user.telephone" value="<s:property value="user.telephone"/>" maxlength="50"/></td>
			<th width="90">手机：</th>
            <td width="270"><input type="text" autocomplete="off" class="sa_w_tx" id="mobile" name="user.mobile" value="<s:property value="user.mobile"/>" maxlength="50"/></td>
		</tr>
		<tr>
			<th width="90">传真：</th>
            <td width="270"><input type="text" autocomplete="off" class="sa_w_tx" id="fax" name="user.fax" value="<s:property value="user.fax"/>" maxlength="50"/></td>
			<th width="90">公司名称：</th>
            <td width="270"><input type="text" autocomplete="off" class="sa_w_tx" id="company" name="user.company" value="<s:property value="user.company"/>" maxlength="50"/></td>
		</tr>
        <tr>
			<th width="90">营业执照号码：</th>
            <td width="270">
                <input type="text" autocomplete="off" class="sa_w_tx" id="businessLicenceNo" name="user.businessLicenceNo" value="<s:property value="user.businessLicenceNo"/>" maxlength="50"/>
            </td>
			<th></th>
			<td>
            </td>
		</tr>
	</table>
<s:actionmessage cssStyle="color:green;text-align:center;"/>
<s:actionerror cssStyle="color:red;text-align:center;"/>
</div>
<div id="sb" class="sb p1020">
    <shiro:hasPermission name="user:modify">
	<input type="button" value="保存" class="btn1" onclick="doModify()"/><input type="button" value="关闭" class="btn1" onclick="clickClose()"/>
    </shiro:hasPermission>
</div>
</s:form>
</body>
